package com.gitee.zou8944.ipersist.utils

import com.gitee.zou8944.ipersist.exception.ResourceNotFoundException
import java.io.InputStream

object Resources {
    fun getResourceAsInputStream(path: String): InputStream {
        return ClassLoader.getSystemClassLoader().getResourceAsStream(path)
            ?: throw ResourceNotFoundException("Resource $path is not found")
    }
}